package group2.model;

import java.util.Date;

/**
 * @author 李显星
 * @date 2020/8/17 15:10
 **/
public class OrderInfo {

    private String orderId; //随机生成
    private String userId;
    private Date createTime;
    private String formatTime;//存createTime（毫秒数）转换的日期
    private String address;
    private String phone;
    private int orderStatus;
    private double total; //合计

    //关联实体
    private OrderStatus status;

    public OrderInfo() {
    }

    public OrderInfo(String orderId, String userId, Date createTime, String formatTime, String address, String phone, int orderStatus, double total, OrderStatus status) {
        this.orderId = orderId;
        this.userId = userId;
        this.createTime = createTime;
        this.formatTime = formatTime;
        this.address = address;
        this.phone = phone;
        this.orderStatus = orderStatus;
        this.total = total;
        this.status = status;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public int getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(int orderStatus) {
        this.orderStatus = orderStatus;
    }

    public double getTotal() {
        return total;
    }

    public void setTotal(double total) {
        this.total = total;
    }

    public OrderStatus getStatus() {
        return status;
    }

    public void setStatus(OrderStatus status) {
        this.status = status;
    }

    public String getFormatTime() {
        return formatTime;
    }

    public void setFormatTime(String formatTime) {
        this.formatTime = formatTime;
    }

    @Override
    public String toString() {
        return "OrderInfo{" +
                "orderId='" + orderId + '\'' +
                ", userId='" + userId + '\'' +
                ", createTime=" + createTime +
                ", formatTime='" + formatTime + '\'' +
                ", address='" + address + '\'' +
                ", phone='" + phone + '\'' +
                ", orderStatus=" + orderStatus +
                ", total=" + total +
                ", status=" + status +
                '}';
    }
}
